package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.DeviceDto;
import com.zzyl.dto.DevicePageQueryDto;
import com.zzyl.entity.Device;
import com.zzyl.entity.DeviceData;
import com.zzyl.vo.DeviceVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DeviceMapper {
    int queryDeviceByDeviceName(String deviceName);

    void saveDevice(Device device);

    Page<DeviceVo> selectByPage(DevicePageQueryDto devicePage);

    DeviceVo queryDeviceDetail(DeviceDto deviceDto);

    Device selectByDeviceName(String deviceName);

    void updateDeviceNikeName(Device device);

    void deleteByIotId(Device device);

    Device queryDeviceByIotId(String iotId);

    void savaDeviceData(List<DeviceData> list);
}
